package UserInterface;

import javax.swing.JPanel;
import javax.swing.JButton;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.BoxLayout;

import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.Insets;
import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionListener;

public class EditorsPanel extends JPanel {

	/**
	 * Create the panel.
	 */
	
	private JButton btnCancel;
	private JButton btnChange;
	private JButton btnOk;
	
	
	
	public EditorsPanel() {
		this.setSize(133, 170);
		setBackground(new Color(255, 248, 220));
		
		btnCancel = new JButton("Cancel");
		btnCancel.setFont(new Font("Tahoma", Font.BOLD, 15));
		btnCancel.setForeground(new Color(255, 0, 0));
		
		btnChange = new JButton("Change");
		btnChange.setForeground(new Color(0, 100, 0));
		btnChange.setFont(new Font("Tahoma", Font.BOLD, 15));
		
		btnOk = new JButton("Ok");
		btnOk.setForeground(new Color(0, 0, 0));
		btnOk.setFont(new Font("Tahoma", Font.BOLD, 15));
		GroupLayout groupLayout = new GroupLayout(this);
		groupLayout.setHorizontalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
					.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
						.addComponent(btnCancel, GroupLayout.PREFERRED_SIZE, 129, GroupLayout.PREFERRED_SIZE)
						.addComponent(btnChange, GroupLayout.PREFERRED_SIZE, 129, GroupLayout.PREFERRED_SIZE)
						.addComponent(btnOk, GroupLayout.PREFERRED_SIZE, 129, GroupLayout.PREFERRED_SIZE))
					.addContainerGap(238, Short.MAX_VALUE))
		);
		groupLayout.setVerticalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
					.addComponent(btnCancel, GroupLayout.PREFERRED_SIZE, 50, GroupLayout.PREFERRED_SIZE)
					.addPreferredGap(ComponentPlacement.RELATED)
					.addComponent(btnChange, GroupLayout.PREFERRED_SIZE, 50, GroupLayout.PREFERRED_SIZE)
					.addPreferredGap(ComponentPlacement.RELATED)
					.addComponent(btnOk, GroupLayout.PREFERRED_SIZE, 50, GroupLayout.PREFERRED_SIZE)
					.addContainerGap(197, Short.MAX_VALUE))
		);
		setLayout(groupLayout);
	} 
	
	public JButton getBtnCancel() {
		return  btnCancel;
		
	   }
	public void setCancelListener(ActionListener lisn){
		btnCancel.addActionListener(lisn);
	}
		
		public JButton getBtnChange() {
			return  btnChange;
			
		}
		public void setChangeListener(ActionListener lisn){
			btnChange.addActionListener(lisn);
		}
		
		public JButton getBtnOk() {
			return btnOk;
			
		}
		
		public void setOkListener(ActionListener lisn){
			btnOk.addActionListener(lisn);
		}
		
}
